package com.kl.forum.service;

import com.kl.forum.dao.CircleLightMapper;
import com.kl.forum.entity.CircleLight;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class CircleArticleLightService {
    @Autowired
    private CircleLightMapper circleLightMapper;

    public  int insert(CircleLight circleLight){
       return circleLightMapper.insertSelective(circleLight);
    }
    public  CircleLight findOneCircleLight(Integer articleId, Integer userId){
        Map map=new HashMap();
        map.put("articleId",articleId);
        map.put("userId",userId);
        return  circleLightMapper.findOneCircleLight(articleId,userId);
    }
    public  int update(CircleLight circleLight){
        return  circleLightMapper.updateByPrimaryKeySelective(circleLight);
    }
}
